package com.sdlg.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sdlg.pojo.BookItem;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BookItemMapper extends BaseMapper<BookItem> {
    @Select("SELECT DISTINCT t_bookitem.*\n" +
            "FROM t_bookitem\n" +
            "JOIN t_order ON t_bookitem.id = t_order.bookitem_id;")
    public List<BookItem> selectBook();
}
